﻿using System;
using System.Collections.Generic;
using FrankJie.Model;
using FrankJie.IDAL;
using FrankJie.Cache;

namespace FrankJie.BLL
{
    public class Comment
    {
        private readonly static IComment dal = DataAccess.CreateComment();

        /// <summary>
        /// 增加一条评论
        /// </summary>
        /// <param name="commentInfo">评论实体</param>
        /// <returns>返回评论ID</returns>
        public static int Add(CommentInfo commentInfo)
        {
            return dal.Add(commentInfo);
        }

        /// <summary>
		/// 删除评论通过ID
		/// </summary>
        /// <param name="id">评论ID</param>
		/// <returns></returns>
        public static bool Delete(int id)
        {
            return dal.Delete(id);
        }

        /// <summary>
        /// 检验通过评论通过ID集合 例1,2,3,4
        /// </summary>
        /// <param name="idList">评论ID集合</param>
        /// <returns>返回是否成功</returns>
        public static bool CheckPass(string idList)
        {
            return dal.CheckPass(idList);
        }
    }
}
